package com.dwd.org.mapper;

import com.dwd.basic.mapper.BaseMapper;
import com.dwd.basic.query.BaseQuery;
import com.dwd.org.pojo.Employee;
import com.dwd.org.pojo.Shop;
import com.dwd.user.pojo.LoginInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: TODO
 * @Author 汶狄
 * @Date 2021/1/15 11:03
 * @Version 1.0
 */
@Repository
@Mapper
public interface ShopMapper extends BaseMapper<Shop> {
    /**
     * 通过
     *
     * @param id
     */
    void updateById(Long id);

    /**
     * 驳回
     *
     * @param shop_id
     */
    void updateTurnById(Long shop_id);

    /**
     * 查询邮箱
     *
     * @param id
     * @return
     */
    String queryEmailById(Long id);

    void updatePassById(Long id);

    /**
     * 修改商家表
     *
     * @param shop
     */
    void updateShop(Shop shop);

    /**
     * 查询admin_id
     *
     * @param id
     * @return
     */
    Long queryAdminIdById(Long id);

    void updateAdmin(@Param("admin") Employee admin, @Param("adminId") Long adminId);

    /**
     * 批量修改通过，
     * @param shops
     */
    void batchUpdate(List<Shop> shops);

    /**
     * 根据logininfo查询对应的shopid
     * @param loginInfo
     * @return
     */
    Long queryShopIdByLoginInfo(LoginInfo loginInfo);
}